package com.example.状态模式;

/**
 * 1. 有个空杯子的状态
 */
public class EmptyCupState implements State {
    private MakeCoffe makeCoffe;

    public EmptyCupState(MakeCoffe makeCoffe) {
        this.makeCoffe = makeCoffe;
    }

    @Override
    public void takeCup() {
        System.out.println("已经有个空杯子了, 不需要再");
    }

    @Override
    public void addInstantCoffe() {
        this.makeCoffe.state = makeCoffe.instantCoffeCupState;
        System.out.println("往杯子加了速溶咖啡");
    }

    @Override
    public void addWater() {
        System.out.println("杯子中还需要先加速溶咖啡粉, 再加水");
    }

    @Override
    public void enjoyCoffe() {
        System.out.println("现在还是空杯子, 享受不了啊");
    }
}
